<?php

class AppAction extends Action{


	public function login(){
		$map['account'] = I('post.account');
		$map['password'] = md5(I('post.password'));
		$res = M('member')->where($map)->find();
		if($res){
			$data['status'] = 1;
			$data['account'] = $res['account'];
		}else{
			$data['status'] = -1;
		}
		echo json_encode($data);
		// echo json_encode($_POST);
		// echo json_encode(array('1','2'));
	}

}